package br.com.positrot.view;


import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;
  
public class SessionCounter implements HttpSessionListener {  
  
    private static int activeSessions = 0;  
   // private static String[] sessionInfo;  
  
    public void sessionCreated(HttpSessionEvent se) {  
        activeSessions++;  
    }  
  
    public void sessionDestroyed(HttpSessionEvent se) {  
        if(activeSessions > 0)  
            activeSessions--;  
    }  
  
    public static int getActiveSessions() {  
        return activeSessions;  
    }  
  
}  
